package com.example.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class Start_Service extends Service {
    public Start_Service() {
    }
    @Override
    public IBinder onBind(Intent intent) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    @Override
    public void onCreate(){
        super.onCreate();
        Toast.makeText(Start_Service.this,"Start服务，启动！",Toast.LENGTH_LONG).show();
        stopSelf();
    }
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Toast.makeText(Start_Service.this,"Start服务，死啦！",Toast.LENGTH_LONG).show();
    }
}